<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@page import="java.text.SimpleDateFormat"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
	<base href="<%=basePath + "admin" %>"/>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<link  rel="stylesheet" type="text/css" href="assets/plugins/bootstrap/css/bootstrap.css"/>
	<script type="text/javascript" src="assets/js/jquery-1.7.2.js"></script>
	<script type="text/javascript" src="assets/plugins/bootstrap/js/bootstrap.js"></script>
	<link rel="stylesheet" type="text/css" href="assets/css/admin_frame.css"/>
  </head>
  
  <body>
  	<div id="mainbox">
  		<div id="header">
  			<jsp:include page="../../Template/admin_top.jsp"/>
  			<% 				
				String datetime=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(Calendar.getInstance().getTime()); 
			%>		
  		</div>
  		<div id="content" class="well">
  			
  			<div id="newsTitles">
  				<table class="table">
  				<tr><th>标题</th><th>作者</th><th>来源</th><th>时间</th><th>操作</th></tr>
		    	<s:iterator value="newsPager.data" id="anews">
		    		<tr>
   						<td><a href="admin/news_listNews"><s:property value="#anews.title"/></a></td> 
   						<td><s:property value="#anews.author"/></td>
   						<td><s:property value="#anews.source"/></td>
   						<td><s:date name="#anews.postdate" format="yyyy-MM-dd HH:mm:ss"/></td>
   						<td><a href="admin/news_deleteNews?id=<s:property value="#anews.id"/>">删除</a></td>
   					</tr>		    		
		    	</s:iterator>
		    	</table>
		    	<a class="btn" href="admin/news_edit">添加新闻</a>
	    	</div>
	    	
					    	
  		</div>
  		<div id="footer">
  			<p>java 分享平台技术中心</p>
	    	<p>© Cuit software 2012 </p>
  		</div>   	
  </div>
  </body>
</html>
